$(function(){
    $("#form-community-add").Validform({
    tiptype:2,
    ajaxPost:true,
    showAllError:true,
    beforeSubmit:function(curform){

        curform.ajaxSubmit({
        type:'POST',
        url:'/index.php?m=Admin&c=Community&a=update',
        success:function(data){
          console.log(status);
          if(data.stat==1){
              layer.msg("修改成功");
              var index = parent.layer.getFrameIndex(window.name);
              setTimeout(function(){
                   parent.layer.close(index);
              },1000);
              parent.location.reload();
            
          }else{
            layer.msg(data.msg);
          }
          }
        });
     return false; 
    }
  });
});